import request from "@/utils/request";

// 发起考试
export function initiateTest(data) {
  return request({
    url: "/papers/papers/initiateTest",
    method: "post",
    data: data
  });
}
// 查询试卷作业详情
export function getPapersInfo(query) {
  return request({
    url: "/papers/papers/getInfo/" + query,
    method: "get",
    params: query,
  });
}

// 查看考试教师人
export function selectTeacher(query) {
  return request({
    url: "/papers/papers/selectTeacher/" + query,
    method: "get",
    params: query,
  });
}

// 查看个人考试列表
export function selectPapersByUserId(query) {
  return request({
    url: "/paperResults/paperResults/selectPapersByUserId" ,
    method: "get",
    params: query,
  });
}

// 提交考试
export function submitTest(data) {
  return request({
    url: "/paperResults/paperResults/submitTest",
    method: "post",
    data: data
  });
}

// 查看试卷详情（考之后)
export function getInfoBack(query) {
  return request({
    url: "/paperResults/paperResults/getInfoBack/",
    method: "get",
    params: query,
  });
}

// 查看试卷考试情况
export function paperResults(query) {
  return request({
    url: "/paperResults/paperResults/list" ,
    method: "get",
    params: query,
  });
}

// 答题记录 待定题的判分
export function awardingOfPoints(data) {
  return request({
    url: "/paperAnswers/paperAnswers/awardingOfPoints",
    method: "post",
    data: data
  });
}